<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title>无标题文档</title>
        <link href="${pageContext.request.contextPath}/css/mainframe.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="./js/prototype.js" ></script>
    </head>

<style>
body{
font-size:13px;
color:#333;
line-height:175%;
margin:0 auto;
background:#fff;
}
</style>
<body leftmargin="0" topmargin="0">
  <table border="0" width="100%" cellpadding="0" bgcolor="#ffffff">
   <tr> <td align="center">
   <div style="width:98%;">
    <fieldset><legend>验证码</legend>
          <form id="form1" action="" method="post" >
            <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#9eb3d0">
            <tr>
                <th width="18%" >用户名：</th>
                <td width="61%"><input name="userName" value="" type="text" size="10" maxlength="10" /></td>
			</tr>
			<tr>
                <th>密码：</th>
                <td><input name="password" value="" type="text" size="10" maxlength="10" onkeydown="getEnter();"/></td>
			</tr>
			<tr>
                <th>验证码： </th>
                <td><img id="imgCode" src="verifyImg.jpg"/><a href="javascript:reloadImg();"> <font color="blue">看不清？</font>  </a></td>
			</tr>
		</table>
		
   </form>
  </body>
   </fieldset>   
   <div><button class="btn_input" id="isChuli" onclick="_submit();"><img src="${pageContext.request.contextPath}/images/ico_chuli.png" />处理</button></div>  
</div></td></tr>
</table>
</body>
<script language="javascript">

	function getEnter(){
		 //event.srcElement获取事件源对象
		 if(event.keyCode == 13 && event.srcElement.type!='submit'){
				alert(window.event.srcElement.type);
				event.returnValue=false;
				//document.getElementById('isLogin').click();//W3C标准
				document.all.isChuli.click();//IE特有
		　}
	}
	function _submit(){
		document.getElementById('form1').action="";
		document.getElementById('form1').submit();
	}
  	function reloadImg(){ 
   	 	var i = Math.random();
    	document.getElementById("imgCode").src="verifyImg.jpg?"+i;
  	}
</script>
</html>